package com.forezp.thinking.chapter15;

import java.lang.reflect.Array;

/**
 * Created by forezp on 2017/12/5.
 */
public class ArrayMaker<T> {

    private Class<T> kind;

    public ArrayMaker(Class<T> kind) {
        this.kind = kind;
    }

    T[] create(int size){
        return (T[]) Array.newInstance(kind,size);
    }
}
